Attribute VB_Name = "MODtools"
Option Explicit

' Send mail to broker -----------------------------------------------------------------------------------------------------------------------

Public Function sendMailToBroker()
        
    Dim oWordDoc As Word.Document
    
    Dim i As Integer

    Dim aHeaders() As Variant

    aHeaders = Array("QUANTITY", "MANUFACTURER", "PART NUMBER", "DATE CODE", "TARGET PRICE")
    
    Set oWordDoc = New Word.Document
     
    oWordDoc.Activate
    
    oWordDoc.Tables.Add oWordDoc.Range, 2, UBound(aHeaders) + 1
    
    For i = 0 To UBound(aHeaders)
    
        oWordDoc.Tables(1).Cell(1, i + 1).Range = aHeaders(i)
        
    Next
    
    oWordDoc.Range.Copy
    
    oWordDoc.Close False
    
    Set oWordDoc = Nothing
    
    'OBS FRMmain.MAPISession1.SignOn
    'OBS FRMmain.MAPIMessages1.SessionID = FRMmain.MAPISession1.SessionID
    'OBS FRMmain.MAPIMessages1.Compose
    
    'OBS FRMmain.MAPIMessages1.send True
    
    'OBS FRMmain.MAPISession1.SignOff
    
End Function


